<template>
	<view class="footer">
		<view class="b">
			<view class="v" @click="jump(1)" :class="types==1?'active':''">
				<image v-if="types==1" src="../../static/img/9/9-3.png" mode="widthFix"></image>
				<image v-if="types!=1" src="../../static/img/9/9-6.png" mode="widthFix"></image>
				首页
			</view>
			<view class="v" @click="jump(2)" :class="types==2?'active':''">
				<image v-if="types!=2" src="../../static/img/9/9-1.png" mode="widthFix"></image>
				<image v-if="types==2" src="../../static/img/9/9-7.png" mode="widthFix"></image>
				分类
			</view>
			<view class="v cv" @click="jump(3)" :class="types==3?'active':''">
				<image src="../../static/img/9/9-5.png" mode="widthFix"></image>
				<!-- <text>专题</text> -->
			</view>
			<view class="v" @click="jump(4)" :class="types==4?'active':''">
				<image v-if="types!=4" src="../../static/img/9/9-2.png" mode="widthFix"></image>
				<image v-if="types==4" src="../../static/img/9/9-8.png" mode="widthFix"></image>
				购物车
			</view>
			<view class="v" @click="jump(5)" :class="types==5?'active':''">
				<image v-if="types!=5" src="../../static/img/9/9-4.png" mode="widthFix"></image>
				<image v-if="types==5" src="../../static/img/9/9-9.png" mode="widthFix"></image>
				个人
			</view>
		</view>
	</view>
</template>

<script> 
	export default {
		props:["types","id"],
		data() {
			return {
				ac:1
			};
		},

		async onLoad(options) {
		},

		methods: {
			jump(type){
				if(type==2){
					uni.navigateTo({
						url:'/pages/inner/cate?id='+this.id
					})
				}else if(type == 3){
					uni.navigateTo({
						url:'/pages/inner/special?id='+this.id
					})
				}else if(type == 4){
					uni.navigateTo({
						url:'/pages/inner/car?id='+this.id
					})
				}else if(type == 5){
					uni.navigateTo({
						url:'/pages/inner/user?id='+this.id
					})
				}else if(type == 1){
					uni.navigateTo({
						url:'/pages/inner/shopindex?id='+this.id
					})
				}
				
			}
			
		},
		

	}
</script>


<style scoped lang="less">
	.footer{
		height: 145rpx;
		// padding-top:42rpx ;
		position: fixed;
		bottom: 0;
		width: 100%;
		z-index: 100;
		padding-bottom: 34upx;
		background-color: #fff;
		.b{
			width: 100%;
			background-color: #fff;
			height: 111rpx;
			line-height: 111rpx;
			display: flex;
			text-align: center;
			
			.v{
				flex: 1;
				height: 111rpx;
				line-height: normal;
				image{
					display: block;
					margin: auto;
					width: 43rpx;
					// height: 36rpx;
					margin-top: 24rpx;
					margin-bottom: 8rpx;
				}
				color: #000;
				font-size: 24rpx;
				text-align: center;
				&.active{
					color: rgb(195,146,91);
				}
			}
			.cv{
				position: relative;
				image{
					position: absolute;
					width: 86rpx;
					height: 86rpx;
					top: 10rpx;
					margin: auto;
					left: 0;
					right: 0;
				}
				text{
					display: block;
					padding-top: 60rpx;
				}
			}
		}
	}
	
</style>
